Dot matrix printer control and storage device

ABSTRACT

A printer capable of operating in a bidirectional printout mode by converting a print code to pattern data and using a print head in which print elements are arranged in a plurality of arrays. A buffer control is provided for controlling in a ring structure entry and retrieval of pattern data into and out of an image buffer. A detachable font cassette stores the pattern data and data associated with print configurations. A pattern data store stores print pattern data in blocks for each of the print element arrays.

BACKGROUND OF THE INVENTION

The present invention relates to a printer which converts a print codeto pattern data and is capable of printing out the data in abidirectional mode using a print head in which print elements arearranged in a plurality of arrays.

Generally, in a dot impact printer, a thermal printer, a thermaltransfer printer, an ink jet printer and other various types ofprinters, print data are converted to pattern data such as characters,diagrams and others (represented by "characters" hereinafter) and, then,the pattern data are developed on an image buffer to print outcharacters.

In a prior art printer of the kind described, pattern data to be printedout are sequentially stored in addresses of an image buffer starting atthe leading address to be developed on the image buffer and, then,sequentially read out of the image buffer starting at the leadingaddress to be printed out. The problem with such a printer is that in abidirectional printout mode since data entry from a host systemconstantly proceeds in the forward direction, during a reverse printoutstroke data have to be read out in the reverse direction. That is, sinceno address in the image buffer becomes empty until all the image datahave been read out during a forward printout stroke, data to be printedout by a reverse printout stroke cannot be stored during that period oftime, resulting in a limited print speed.

Meanwhile, such a piror art printer is furnished with a charactergenerator which comprises a read only memory (ROM) or the like havingpattern data stored beforehand therein. To enhance the performance of aprinter, it is desirable to furnish the printer with various kinds ofprinting functions such as a function of printing Kanji (Chinesecharacters) of the first level, and that of printing Kanji of the secondlevel, and an ultrahigh-speed printing function, a high-speed printingfunction, a high-density printing function, etc. One approach toimplement such various functions is storing in a ROM the pattern datarepresentative of all the characters, Kanji, of the first and secondlevels or the pattern data representative of all the characters whichbelong to all the possible fonts, or print configurations, such as anultrahigh-speed printing, a high-speed printing and a high-densityprinting, the ROM being installed in a printer body. However, should aROM or like store loaded with patterns of all the fonts be permanentlybuilt in a printer body, it would increase the memory capacity of theprint body as well as cost to a prohibitive degree.

In a print head, print elements are usually arranged in two staggeredarrays one of which is made up of odd print elements and the other, evenprint elements. Hence, if print pattern data are stored according to theorder of arrangement of pixels which are so printed out, print elementdrive data and the print pattern data are brought out of coincidence. Inlight of this, it has been customary to perform a printout control suchthat, for example, drive data associated with even print elements areobtained based on even ones of print pattern data and drive dataassociated with odd print elements based on odd ones. Specifically, sucha prior art printout control scheme consists in reading three bytes (onecolumn) of print pattern data which are aligned with odd print elementspositions, then extracting only those data which are associated with oddprint elements, then rearranging and storing the extracted data (1.5bytes) in a data buffer, then reading three bytes (one column) of printpattern data which are aligned with the even print element positions,then extracting data associated with the even print elements, and thenrearranging and storing the extracted data (1.5 bytes) in the databuffer. However, such awkward steps of selecting only odd data or evendata out of one byte of data which are read out of a character generatorand, then, rearranging the selected data result in a disproportionatedata processing time which is contrary to the demand for high-speed dataprocessing and, therefore, a high-speed printer.

SUMMARY OF THE INVENTION

It is therefore a first object of the present invention to increase theprint speed of a printer which is capable of operating in abidirectional printout mode.

It is a second object of the present invention to allow different fontsof characters to be readily printed out without increasing the memorycapacity of a printer body.

It is a third object of the present invention to enhance high-speed dataprocessing and, thereby, high-speed printing operation of a printer.

It is another object of the present invention to provide a generallyimproved printer.

In accordance with one aspect of the present invention, there isprovided a printer for printing out data in a bidirectional mode byconverting print data to pattern data which comprises a print headhaving print elements arranged in a plurality of arrays, an image bufferfor developing the pattern data, and a buffer control for controlling ina ring structure entry and retrieval of the pattern data into and out ofthe image buffer.

In accordance with another aspect of the present invention, there isprovided a printer capable of printing data in a bidirectional mode byconverting print data to pattern data which comprises an image bufferfor developing the pattern data, and a buffer control for controlling ina ring structure entry and retrieval of the pattern data into and out ofthe image buffer.

In accordance with another aspect of the present invention, there isprovided a printer which comprises a print head having print elementsarranged in a plurality of arrays, and a pattern data store for storingprint pattern data in block for each of the print element arrays.

In accordance with another aspect of the present invention, there isprovided a printer which comprises a circuit for converting print datato pattern data, and a detachable font cassette storing the pattern dataand data which are associated with print configurations.

The above and other objects, features and advantages of the presentinvention will become more apparent from the following detaileddescription taken with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an external perspective view of a printer to which the presentinvention is applied;

FIGS. 2 and 3 show a specific mechanical arrangement of the printer ofFIG. 1 in a plan view and a front view, respectively;

FIGS. 4 and 5 show details of a carriage included in the mechanism ofFIGS. 2 and 3 in a plan view and a side elevational view, respectively;

FIG. 6 is a plan view of a ribbon feed mechanism included in the samemechanism;

FIG. 7 is a perspective view useful for the description of loading andunloading of a font cassette;

FIG. 8 is a perspective view of the font cassette;

FIG. 9 is a perspective view of another specific construction of thefont cassette;

FIGS. 10A, 10B and 10C comprise a block diagram, connected as shown inFIG. 10, showing a specific construction of a control section which isbuilt in the printer;

FIG. 11 is a view useful for the description of data which are stored inthe font cassette;

FIGS. 12-16 show specific examples of character patterns which belong todifferent fonts;

FIGS. 17A, 17B, 18A and 18B, show different systems for storing patternsin the font cassette;

FIG. 19 shows an arrangement of print elements in a print head;

FIGS. 20-24 show patterns which are representative of specific examplesof different print configurations;

FIGS. 25A and 25B comprise a block diagram connected as shown in FIG.25, showing essential functions which are assigned to a mastermicroprocessor of FIG. 10;

FIG. 26 is a view of pointers associated with the master microprocessor;

FIGS. 27A-27C comprise a functional block diagram, connected as shown inFIG. 27, associated with a buffer input control of FIG. 25;

FIG. 28 is a functional block diagram associated with a buffer outputcontrol of FIG. 25;

FIGS. 29A and 29B comprise a flowchart connected as shown in FIG. 29,totally demonstrating a buffer input/output control processing; and

FIGS. 30 and 31 are views useful for the description of a method ofstoring image data in a data buffer.

DESCRIPTION OF THE PREFERRED EMBODIMENT

While the printer of the present invention is susceptible of numerousphysical embodiments, depending upon the environment and requirements ofuse, a substantial number of the herein shown and described embodimenthave been made, tested and used, and all have performed in an eminentlysatisfactory manner.

Referring to FIG. 1, a wire dot impact printer to which the presentinvention is applied is shown in a perspective external view. A housingof the printer comprises a lower casing 1 and an upper casing 2 foraccommodating a mechanical section and a control section, and anopenable cover 3 for facilitating replacement of a ribbon cassette, afont cassette and other parts which will be described. A control panel 4which is mounted on the front of the printer is provided with variousswitches such as a form feed switch, an on-line/off-line switch and apose switch, as well as various displays such as ribbon end display anda paper end display.

Referring to FIGS. 2 and 3, the mechanical section installed in theprinter includes a platen 12 which is rotatably supported by a pair ofspaced frames 11 and 11. A paper which serves as a printing medium ispassed over the platen 12. The platen automatically feeds the paperdriven by a line feed motor 13 through a motor gear 14, an idle gear 15,a gear 16 movable integrally with the idle dear 15, a timing belt 17,and a platen gear 18. The line feed motor 13 is implemented with astepping motor. Knobs 19 and 19 respectively are mounted to oppositeends of the platen 12 and manually rotatable to rotate the platen 12.Manual rotation of the platen 12 may be effected in the event of, forexample, loading a paper or removing it. A paper bail 22 carrying bailrollers 22 therewith (see FIG. 1) is positioned in front of the platen12 and pivotally supported by spaced bail frrames 20 and 20, which inturn are rotatably mounted to the frames 11 and 11. A platen gear 23 isrigidly connected to the opposite side of the platen 12 to the platengear 18 in order to transmit a driving force to a paper feed mechanismof a paper feed device, e.g. form tractor.

Rigidly supported by the frames 11 and 11 are a guide rod 25 and a stay26. A carriage 27 is mounted on the guide rod 25 and stay 26 in such amanner as to be movable along and parallel to the axis of the platen 12.The carriage 27 carries a print head 28, a ribbon cassette 29 loadedwith an ink ribbon, a ribbon feed mechanism 30 for feeding the inkribbon (described later in detail), etc. The ink ribbon may comprise afabric ribbon, a multistrike ribbon, or like film ribbon. A timingpulley 33 is directly connected to an output shaft of a space (carriagefeed) motor 32, which is fixed to a subframe 31 and comprised of astepping motor, while a guide pulley 35 is retained by the frame 11 andtensioned by a spring plate 34. A timing belt 36 is passed over thetiming pulley 33 at one end and over the guide pulley 35 at the otherend. Fixed to the lower portion of the carriage 27, the timing belt 36is driven by the space motor 32 to in turn move the carriage 27.

Two wire holders 41 and 41 are mounted on the frames 11 and 11,respectively. In order to transform the movement of the carriage 27 intoa ribbon feeding force which the ribbon feed mechanism 30 is to exert, awire 42 is directly fixed to one of the wire holders 41 and 41 at oneend and fixed to the other wire holder 41 through a spring 43 at theother end. A light intercepting plate 44 is mounted on the left frame11, while a home sensor 45 which comprises a transmission typephotosensor is mounted on the carriage 27. The interceptor 44 and thehome sensor 45 cooperate to sense a home position of the carriage 27. Asshown in FIG. 2, a paper end sensor which comprises a reflection typephotosensor is positioned at the rear left of the platen 12 and mountedon a deflector which, although not shown, is adapted to guide a paper.As also shown in FIG. 2, a predetermined circuit board 47 is mounted onthe back of the control panel 4. A cassette holder 48 is provided on thecircuit board 47 to be loaded with a font cassette, which stores patterndata in accordance with the present invention. A connector 49 isprovided on the bottom of the cassette holder 48 to which a connector ofthe font cassette is connectable.

Referring to FIGS. 4 and 5, the carriage 27 of the printer is shown indetail. As shown, the carriage 27 comprises a carriage block 51 which isslidably mounted on the guide rod 25. The timing belt 36 is mounted onthe underside of the carriage block 51. A top plate 52 is rigidlymounted on the carriage block 51 to support the print head 28 thereon.Paper guides 53 and 53 are provided at opposite front ends of the topplate 52 of the carriage 27 in order to guide a paper in the event ofinsertion of a paper and during a printout operation. A roller 54 isrotatably mounted on the underside of the top plate 52 to roll on thestay 26. The carriage home sensor 45 is mounted on a lower portion of asupport plate 55 which is rigid on the underside of the top plate 52.

Mounted on the upper surface of the top plate 52 is a ribbon end sensor56 which comprises a transmission type photosensor and serves to sensethe end of a multistrike ribbon when such a ribbon is used. Cassetteretainers 57 and 57 for holding the ribbon cassette 29 are mounted atopposite rear end portions of the top plate 52. The ribbon feedmechanism 30 is mounted on the underside of the top plate 52. The ribbonfeed mechanism is furnished with a ribbon feed escape mechanism which,powered by the movement of the carriage 27, feeds the ribbon of theribbon cassette 29 in one direction with no regard to the direction ofmovement of the carriage 27 and, during a one-directional printout mode,interrupts the feed of the ribbon during strokes in the other direction.

Details of the ribbon feed mechanism 30 will be described with referencealso made to FIG. 6. The mechanism 30 includes a drive shaft 61 which isbiased by a spring from the inside and provided with a ribbon feed gear63. The ribbon feed gear 63 is rotatably mounted by a bearing 64 to theunderside of the top plate 52 with the drive shaft 61 positioned on theupper surface of the top plate 52. An idler gear 65 is rotatably mountedto the top plate 52 by a shaft 66 and constantly meshed with the ribbonfeed gear 63. A generally L-shaped lever 67 is pivotally mounted to theunderside of the top plate 52 by a stud 68. A shaft 72 extends from oneend of the pivotal lever 67, while a pulley 71 carrying a comparativelysmall diameter gear 70 therewith is rotatably mounted on the shaft 72.The gear 70 is engageable with the idler gear 65. Also, a shaft 75extends from the other end of the lever 67, while a pulley 74 having thesame diameter as the pulley 71 is rotatably mounted on the shaft 75. Thepulley 74 integrally carries therewith a comparatively large diametergear 73 which is engageable with the idler gear 65. Alternatively, thegears 70 and 73 may be provided with the same diameter and the pulleys71 and 74 different diameters, or both the gears 70 and 73 and thepulleys 71 and 74 may be provided with different diameters. Each of thepulleys 71 and 74 is provided with smooth upper and lower recesses inorder to prevent various runs of the wire 42 from making contact witheach other.

The wire 42 is passed over the pulleys 71 and 74 crosswise so that thepulleys 71 and 74 may rotate in opposite directions to each other.Specifically, the wire 42 is passed clockwise over the lower recess ofthe pulley 74 from the left, then passed counterclockwise over the lowerrecess of the pulley 71, then shifted to the upper recess of the samepulley 71, then passed clockwise over the upper recess of the pulley 74,and then pulled out to the right. Since the wire 42 is fixed in themanner described, when the carriage 27 strokes in a direction indicatedby an arrow Q (forwardly) in FIG. 6, the wire 42 behaves as if it werepulled in a direction indicated by an arrow P with the result that thepulley 71 is rotated as indicated by a solid arrow, the pulley 74 asindicated by a phantom arrow, and the lever 67 as indicated by an arrowR. This causes the large diameter gear 73 associated with the pulley 74to mesh with the idler gear 65 to thereby drive the latter as indicatedby a solid arrow, the idler gear 65 in turn driving the ribbon feed gear63 as indicated by a solid arrow.

As the carriage 27 strokes in the direction P (backwardly), the wire 42behaves as if it were pulled in the direction Q so that the pulley 71 isrotated as indicated by a phantom arrow, the pulley 74 as indicated by asolid arrow, and the lever 67 as indicated by an arrow S. As a result,the small diameter gear 70 associated with the pulley 71 meshes with theidler gear 65 to drive the idler gear 65 and, thereby, the ribbon feedgear 63 as indicated by the arrow.

As described above, while the carriage 27 strokes in any of the forwardand backward directions, the ribbon feed gear 63 is constantly rotatedin the same direction as indicated by the solid arrow and, thereby,feeds the ribbon in the same direction.

Now, the ribbon feed mechanism 30 having the above constructionsuccessfully feeds the ribbon, whichever the direction of carriagemovement may be in a bidirectional printout mode. This, however, wastesribbon in a one-directional printout mode because a ribbon, particularlya film ribbon, would be fed unused. In accordance with the presentinvention, the mechanism 30 is furnished with a ribbon feed escapemechanism which in a one-directional printout mode (forward printoutonly) prevents the mechanism 30 from feeding the ribbon during backwardstrokes of the carriage 27.

Specifically, the ribbon feed escape mechanism includes a generallyL-shaped escape lever 77 which is rotatably mounted on a stud 68 andprovided at one end with a pawl 77a which is engageable with the lever67. A spring 78 constantly biases the escape lever 77 to the illustratedretracted position which allows the lever 68 to move. An escape magnet79 is adapted to selectively attract the other end of the escape lever77. During a bidirection printout mode, the escape magnet 79 isdeactivated and the escape lever 77 is urged by the spring 78 to theretracted position, so that the lever 67 may be moved to feed the ribbonin the same direction responsive to the strokes of the carriage ineither direction as previously stated.

During a one-directional printout mode, on the other hand, the escapemagnet 79 is activated when the carriage 27 moves in the direction P.Then, the escape lever 77 is rotated as indicated by a solid arrowagainst the action of the spring 78 so that its pawl 77a prevents thelever 67 from rotating in the direction S beyond a predetermined extent.As a result, the lever 67 is held in the illustrated neutral positionwhich allows none of the gear 73 of the pulley 74 and the gear 70 of thepulley 71 to mesh with the idler gear 65, thereby maintaining the ribbonfeed gear 63 unrotated and, thereby, the ribbon unfed. In this manner,during a one-directional printout mode, the ribbon feed is interruptedwhile the carriage 27 strokes in the other direction.

A font cassette associated with the printer of the present invention isconstructed as follows.

Referring to FIG. 7, a font cassette 81 is loaded in the cassette holder48 which is mounted on the back of the control panel 4. The fontcassette 81 comprises a casing which is made up of a cassette case 82and a cassette board 83. Inside of the casing, a board 84 is fixed tothe cassette board 83. Arranged on the board 84 are a read only memory(ROM), a random access memory (RAM) and like store elements 85 and 85,and a connector 87 which is connectable to the connector 49 which isassociated with the cassette holder 48. Further, where the storeelements are volatile, a backup battery 88 is mounted on the board 84.The store elements 85 and 85 store various data inclusive of characterpattern data associated with various fonts and data associated withprintout modes associated with the stored fonts (font identificationdata), as described later in detail. Concerning the font identificationdata, as shown in FIG. 9, they may be stored in the form of a bar code81a which is provided on the outer surface of the cassette case 82, inwhich case a bar code reader 89 will be fixed to the printer body forreading the bar code 81a.

Referring to FIG. 10, the control section of the printer is shown andincludes a printer controller 100 adapted to supervise the operations ofthe whole printer. The controller 100 is connected to a host systemthrough an interface (I/F) connector 101 to exchange various I/F datasuch as character code data, carriage movement data and line feed datafrom the host system. The printer controller 100 is also connected by aconnector 102 and a cable 103 to a connector 104 provided in the controlpanel 4 so as to receive signals representative of statuses of variouspanel switches on the control panel 4, while delivering on/off controlsignals to the control panel 4 for controlling various displays. Thecontrol panel 4 is provided with various panel switches 105 and displays106, and a latch 107 for latching signals which are exchanged betweenthe panel switches 105 and displays 106 and the controller 100.

Further, the print controller 100 fetches through the control panel 4pattern data from font cassette 81A or 81B which is loaded in thecassette holder 48 of the control panel 4 and connected to the connector49. The font cassette 81A comprises a ROM 85A which stores pattern dataand others and a connector 87A which is connectable to the connector 49of the control panel 4. The font cassette 81B, on the other hand,comprises a RAM 85B which stores pattern data and others and is backedup by the battery 88, and a connector 87B connectable to the connector49.

In detail, the printer controller 111 includes a master microprocessor111 which fulfills various controls over the printer except for spacedrive and line feed drive, e.g. processing I/F data fed from the hostsystem, controlling the control panel 4, controlling the print head 28,and monitoring various sensors. The master microprocessor 111bifunctions as buffer control means. Specifically, the mastermicroprocessor 111 is connected to a bus via a bus driver 112 to readvarious data applied from the host system to an I/O port 113, operationdata from the control panel 4, output signals of various sensors, fontidentication data or pattern data from the font cassette 81A or 81B, andother data. Processing such data, the master microprocessor 111 performsvarious controls as will be described.

For example, the master microprocessor 111 transforms print datasupplied thereto from the host system into image data by means of a ROM115, the previously mentioned font cassette 81A or 81B, and a RAM 117which stores pattern data (hereinafter, these elements will collectivelybe referred to as a "character generator CG"), and develops the imagedata in a data buffer (image buffer) 118. Backed up by an externalbattery 116, the RAM 117 serves to download pattern data which aretransferred from the host system so that even special characters may bereadily coped with. Likewise, where the font cassette is implementedwith a battery backed up RAM or an electrically rewritable ROM (EEPROM),for example, special characters and the like may be printed out withease by downloading pattern data from the host system to the fontcassette.

When developed one line of image data on the data buffer 118, the mastermicroprocessor 111 reads the image data out of the data buffer 118 anddelivers them to an I/O port 120 to control head drivers 121 and 122,thereby controllably driving pins (print elements) of the print head 28.The microprocessor 111, depending upon the printout mode which is eitherone-directional or bidirectional, controls a magnet driver 123 via theI/O port 120 so as to controllably drive the ribbon escape magnet 79.Applied through the I/O port 120 to the microprocessor 111 are outputsignals of various sensors such as a thermistor 28A mounted in the printhead 28 to sense head temperature, the ribbon end sensor 56, the paperend sensor 46, and a cover open switch 124. Responsive to such sensoroutputs, the microprocessor 111 controls the drive time of the printhead 28 (temperature control), on/off of the displays on the controlpanel 4, stop/start of printer operation, etc.

The master microprocessor 111 supplies a slave microprocessor 125 withcarriage movement data representative of an amount and a direction ofcarriage movement and paper feed data representative of an amount and adirection of paper feed, based on carriage movement data and line feeddata which are fed from the host system to the microprocessor 111.Responsive to the paper feed data from the master microprocessor 111,the slave microprocessor 125 controls a line feed driver 126 which thendrives the line feed motor 13 and, thereby, the platen 12 to feed thepaper. Further, responsive to the carriage movement data from the mastermicroprocessor 111, the slave microprocessor 125 controls a space driver127 to drive the space motor 32 so that the carriage 27 is moved to anecessary position.

The operation of the printer in accordance with the present inventionwill be described with reference also made to FIG. 11 and onward.

The store element 85 of the font cassette 81 stores font identificationdata and character data, as shown in A of FIG. 11. The fontidentification data consist of font numbers n stored in the frontcassette, character numbers m, the first font leading address to the nfont leading address representative of the leading addresses of thecharacter data areas which are assigned to the first to the n fonts, andthe first font print pitch and print density to the n font print pitchand print density representative of print configurations of the first tothe n fonts.

The character data consist of character data associated with the firstto the n fonts. As shown in B of FIG. 11, the character data associatedwith each of the fonts are made up of stored character data and patterndata. In FIG. 11, the i font should be understood as implying any one ofthe first to the n fonts. Concerning the stored character data, theyconsist of a leading low address, a leading high address, a left columnnumber LC, a data column number DC, and a right column number RC foreach of the characters.

In this manner, the stored character data are each in five bytes for asingle character; assuming that 226 characters are stored, then226×5=1130 bytes. As to the pattern data, pattern data associated withall the characters belonging to the i font are stored, e.g. 226characters of pattern data. In the example shown in FIG. 11, marked withheart are the leading character pattern of the i font and marked withsquare are the trailing character pattern. However, such is onlyillustrative.

The pattern of a character "@" may be printed out in various fonts asshown in FIGS. 12-16.

FIG. 12 shows the character @ in "Letter Gothic 10" in which TC (totalcolumn)=18, LC=4, DC=11, and RC=3. FIG. 13 shows it in "Letter Gothic12" in which TC=15, LC=2, DC=11, and RC=2. FIG. 14 shows it in "Courier10" in which TC=36, LC=7, DC=23, and RC=6. FIG. 15 shows it in "PrestigeElite 12" in which TC=30, LC=4, DC=22 and RC=4. Further, FIG. 16 showsit in "Bold Face P.S" in which TC=7×6=42, LC=9, DC=24, and RC=7. In thecase of the font shown in FIG. 16, the total column number TC dependsupon the character, i.e., TC=number of units×6; in the illustratedexample, the number of units is seven.

Reference will be made to FIGS. 17A and 17B and FIGS. 18A and 18B whichillustrate different systems available for storing such characterpattern data in a store element.

FIG. 17A shows a character pattern (DC=11) having the first to thetwenty-fourth rows. As shown in FIG. 17B, the first to the twenty-fourrows of each column of the pattern shown in FIG. 17A are sequentiallystored by each eight bits (one byte). Specifically, the first to theeighth rows of the first column (twenty-four dots) are stored in thefirst byte, the ninth to the sixteenth rows in the second byte, and theseventeenth to the twenty-fourth rows in the third byte. The same holdstrue with the second to the DC rows. In the system shown in FIGS. 18Aand 18B, concerning the character pattern shown in FIG. 18A (DC=11), thefirst, third, fifth, seventh, ninth, eleventh, thirteenth and fifteenthrows of the first column (twenty-four dots) are stored in the firstbyte, the seventeenth, nineteenth, twenty-first, twenty-third,twentieth, twenty-second and twenty-fourth rows in the second byte, andthe second, fourth, sixth, eighth, tenth, twelfth, fourteenth andsixteenth rows in the third byte. The same holds true with the second tothe DC rows. In short, the system of FIGS. 18A and 18B is such that ineach column the first to the twenty-fourth rows are divided into oddrows and even rows, the odd rows and the even rows are individuallysubdivided by eight bits (one byte), and the remaining four bits of eachof the odd and even rows are stored together as eight bits (one byte).

The store system shown in FIGS. 18A and 18B is directed to enhancinghigh-speed processing in relation to a print head PH shown in FIG. 19 inwhich pins (print elements) 1-24 are arranged in an array PHO of oddpins and an array PHE of even pins, the two arrays being staggered fromeach other. Specifically, in such a particular pin arrangement, afterthe odd pin array has printed out dots in a given line, the even pinarray prints out dots when reached that line. Then, should the oddcolumn (odd pins) and the even column (even pins) be alternately storedon a bit basis, each of all the one-byte data would always need to bereedited into odd row (odd pin) data and even row (even pin) data. Incontrast, where odd row (odd pin) data and even row (even pin) data arestored independently of each other as shown in FIGS. 18A and 18B, whatis required is, concerning the first column, for example, merelydirectly outputting the data in the first and third bytes anddivisionally outputting the data in the second byte only. This promotesthe ease of processing to a significant extent and, thereby, enhancesfast processing.

Next, data stored in a font cassette and representative of printconfigurations (print pitches and print densities) will be describedwith reference to FIGS. 20-24.

Assuming that the maximum response frequency of the pixel forming means(print elements=print pins) of the print head PH is f (hertz)(repetition period=T), and that the density (resolution=print density)of pixels is D (millimeter), two different methods are available:driving each of the print elements at each print density D, and drivingit in a thinned manner at the printing pitch P=lD (millimeter), where lis an integer. The first-mentioned method is equivalent to thesecond-mentioned method when l in the latter is 1 (one). To print outcharacters as fast as possible while preserving acceptable printoutquality, the print density D should be controlled as low as possible.This, coupled with adequately determining the integer as l=2, 3 . . . ,will realize high-resolution and high-speed printout. In this instant,the velocity V (millimeter per second) of the carriage is expressed as:

    V=P/T=l·D/T

That is, decreasing the print density D enhances the resolution, whileselecting a value which is not greater than 2 as the integer l increasesthe carriage velocity, i.e. print speed.

Different print configurations are shown in FIGS. 20-24. In FIG. 20, anexample of a character printed out by ultrahigh-speed printing is shown.Ultrahigh-speed printing is effected with a print density D=1/180 inch,l₁ =3, and print pitch P₁ =3D₁ =1/60 inch, and by moving the carriage ata velocity V₁ =1/60T (inch per second). In FIG. 21, an example ofhigh-speed printing is shown which is implemented with a print densityD₂ =1/180 inch, l=2, and print pitch P₂ =2D₂ =1/90 inch, and by movingthe carriage at a velocity V₂ =1/90T (inch per second). In FIG. 22, anexample of ordinary printing is shown which is obtainable with a printdensity D₃ =1/180 inch, l₃ =1, and a printing pitch P₃ =1D₃ =1/180 inch,and moving the carriage at a velocity V₃ =1/180T (inch per second). InFIG. 23, an example of high-quality printing is shown which isimplemented with a print density D₄ =1/360 inch, l₄ =2, and a printpitch P₄ =2D₄ =d/180 inch, and moving the carriage at a velocity V₄=1/180T (inch per second). Further, in FIG. 24, an example of anultrahigh-quality printing is shown which is attainable with a printdensity D₅ =1/360 inch, l₅ =1, and a print pitch P₅ =1D₅ =1/360 inch,and moving the carriage at a velocity V₅ =1/360T (inch per second).

Where particular data representative of print configurations such asultrahigh-speed printing, high-speed printing, ordinary printing,high-quality printing, ultrahigh-quality printing and others are storedin terms of print densities and print pitches as described above, it ispossible to print out characters in various configurations by performingprintout control and merely by replacing a font cassette.

Referring to FIG. 25, the printout control which is assigned to themaster microprocessor 111 is shown in a functional block diagram. Abuffer input control 111A processes I/F data (character data and others)which come in through the I/O port 113 and, based on the result of theprocessing, controls the character generator CG to store characterpattern data (image data) in the data buffer (ring buffer) 118. A bufferoutput control 111B reads image data out of the data buffer 118 tocontrollably drive the print elements of the print head 28. A fontidentification register 111C serves to store various font identificationdata which are generated by the character generator CG. A carriagecontrol 111D generates carriage movement data for controllably drivingthe space motor 32 and delivers it to the slave microprocessor 125.

As shown in FIG. 26, a print start pointer PT2 is adapted to indicate aprint start position, a print end pointer PT3 a print end position, anda carriage current point PT1 a current position of the carriage 27, orthat of the print head 28. A current row store direction flag T2 isrepresentative of a store direction of image data in a current row whichis stored in the data buffer 118, and a print direction flag T1 acurrent print direction.

A compute section 111E reads the print point PT2 and print end pointerPT3 to provide a center pointer PT4=(PT2+PT3)/2. A compare section 111Fcompares the center pointer PT4 provided by the compute section 111Ewith the carriage current pointer PT1 to determine a print directionand, based on the result, sets the print direction flag T1. A comparesection 111G compares the current row store direction flag T2 with theprint direction flag T1 to determine a store direction of the next rowinto the data buffer (ring buffer 118) and, based on the result, setsthe flag T₃ which serves as a next row store direction flag for thebuffer input control 111A and an output directoion flag for the bufferoutput control 111B.

The processing assigned to the buffer input control 111A will bedescribed with reference to FIG. 27. First, if the I/F data from thehost system is font selection data, a font select section FSE of thebuffer input control 111A accesses the font identification data storearea of the character generator DG to read out font identification dataand store them in respective registers of the font identificationregister 111C. Specifically, among the font data read out of thecharacter generator CG, the font number n is stored in a font numberregister Rn, the i font leading address (ADRS) in an i font leadingaddress register RA, the print pitch P in a print pitch register RP, andthe print density D in a print density register ED. The font selectsection FSE decides whether the font number n stored in the register Rnis identical with the font number indicated by the font selection dataand, if not, repeatedly and sequentially accesses the other frontidentification data store areas of the character generator untilcoincidence is set up.

Consequently, in the respective registers of the front identificationregister 111C the font number n, i font leading address (ADRS) i, printpitch P and print density D associated with the designated font arestored. Thereafter, as character data indicative of any particularcharacter x, a character code/address convert section CCC converts it toaddress data. An add section ADD adds the output address of the convertsection CCC to the i font leading address (ADRS) i which has been storedin the i font leading address register RA, thereby generating addressdata representative of the leading address of the character x pattern ofthe i font. Based on the address data output from the adder ADD, aparticular address of the character generator CG which stores theleading address of the character x pattern of the i font is accessed sothat the leading address data of the character x pattern of the i fontis transferred to a pattern data register PDR.

The character generator CG is accessed by the i font, character xpattern data leading address data which has been stored in the patterndata register PDR, whereby data in the first byte of the pattern datarepresentative of the character x are read out. Thereafter, the i font,character x pattern data leading address of the pattern data registerPDR is incremented by a data buffer input address control section DBIC,which will be described, at a timing which will also be described. As aresult, an i font, x pattern data address is generated to access thecharacter generator CG again, so that data in the second byte of thecharacter x are read out. Such a procedure is repeated to retrieve allthe pattern data associated with the character x.

Meanwhile, when a character code is supplied from the host system, itincrements a character counter CC. The character counter CC counts upwhen one line of character codes have been entered. A data buffer inputaddress control section DBIC is supplied with the next row storedirection flag T3 output from the compare section 111G, a countup signaloutput from the character counter CC, and a print density D output froma print density register RD of the font register. Responsive to suchinputs, the data buffer input address control DBIC determines inputaddresses of the data buffer 118 and transfers them to a data bufferinput address register BIAR. Then, the pattern data which are read outof the character generator CG byte by byte as previously mentioned areloaded in the addresses which have been set in the data buffer inputaddress register BIAR.

Thereafter, the data buffer input address control DBIC continuouslyincrements the pattern data register PDR and increments or decrementsthe data buffer address register BIAR until the character counter CCproduces a countup signal. This allows pattern data read out of thecharacter generator CG to be sequentially loaded in specific addressesof the data buffer 118 one byte at a time. When the character counter CChas counted up with one line of pattern data fully stored, the databuffer input address control DBIC again checks the next row storeddirection flag T3 and, then, repeats the above procedure. Also, the databuffer input address control DBIC sets the current row store directionflag 2, print start point PT2, print end pointer PT3, buffer startaddress BF1, and buffer end address BF2.

The print pitch P and the print density D which respectively are storedin the print pitch register PR and the print density register of thefont identification register 111C are delivered to a carriage velocitydecide section CV to determine a carriage velocity. The slavemicroprocessor 125 responsive to the determined carriage velocitycontrols the carriage velocity in conformity to the particular printpitch and density, i.e. print configuration.

The processing assigned to the data buffer output control 111B will bedescribed with reference to FIG. 28. When a carriage movement clockinterrupt signal is applied from the slave microprocessor 125, a printtiming control section PTC delivers a print timing signal to a databuffer output address control section DBOC. The data buffer outputaddress control DBOC reads the print start pointer PT2, print endpointer PT3, buffer start address BF1 and buffer end address BF2 whichare set by the data buffer input control 111A as previously stated, theoutput direction flag (next row store direction flag) T3 set by thecompare section 111G, and the print density D from the print densityregister RD of the font identification register 111C.

Based on those data, the output address control DBOC determines anoutput address of the data buffer 118 and, then, supplies a data bufferoutput address register BOAR with output address data. The register BOARin turn accesses the data buffer 118 using the output address data,whereby image data in that address is read out and fed to an I/O port120 which receives a timing signal from the print timing control sectionPTC. Print pins in the print head 28 are selectively driven to print outdata responsive to the image data. Also, the data buffer output addresscontrol DBOC serves to set a carriage current pointer PT1 as the imagedata is read out of the data buffer 118.

The master microprocessor 111 supervises the data buffer 118 as will bedescribed totally with reference to FIG. 29. Upon entry of a print startcommand, the microprocessor 111 performs the following operation tocompute the center pointer (PT4)j of the j row:

    (PT4)j={(PT2)j+(PT3)j}/2

Then, comparing the center pointer (PT4)j with the carriage currentpointer (PT1)j, the microprocessor 111 determines a print direction.Specifically, if (PT1)j≦(PT4)j, implying that the current carriageposition is leftwardly of the center of the print range, themicroprocessor 111 sets the print direction flag (T1)j to the forwarddirection; if not (PT1)j≦(PT4)j, implying that the current carriageposition is righwardly of the center of the print range, it sets theprint direction flag (T1)j to the backward direction.

The print direction is determined responsive to the current carriageposition as stated above, so that the carriage can be located in a printstart position within the shortest period of time, thereby speeding upthe printing operation.

Thereafter, the microprocessor 111 compares the current row store flag(T2) with the print direction flag (T1)j to determine an image datastore direction of the j line into the data buffer 118. Specifically, ifthe current row store direction flag (T2)j=print direction flag (T1)j,the microprocessor 111 sets the next row store direction flag (T3) tothe forward because the current row store direction is the same as theprint direction, if not (T2)j=(T1)j, the microprocessor 111 sets theflag (T3)j to the backward because the current row store direction isdifferent from the print direction. Meanwhile, in buffer input controlprocessing, the microprocessor 111 determines whether the next row storedirection flag (T3)j is forward. If it is forward, the microprocessor111 uses the buffer start address (BF1)j+1 of the row (j+1) next to thej row as a buffer end address (BF2) of the j row.

If the next row store direction flag (T3)j is not forward, then themicroprocessor 111 uses the buffer start address (BF1)j+1 of the row(j+1) next to the j row as a buffer start address (BF1)j of the j row.Subsequently, after causing the current row store direction flag (T2)jto coincide with the next row store direction flag (T3)j, themicroprocessor 111 calculates a print start pointer (PT2)j+1, a printend pointer (PT3)j, and a buffer end address (BF2)j. In buffer outputcontrol processing, on the other hand, the microprocessor 111 decideswhether the output direction flag (T3)j, which also serves as a next rowstore direction flag, is forward. If it is forward, the microprocessor111 outputs the buffer start address (BF1)j to the buffer end address(BF2)j of the data buffer 118.

If the flag (T3)j is not forward, the microprocessor 111 outputs thebuffer end address (BF2)j to the buffer start address (BF1)j of the databuffer 118. Then, the microprocessor 111 determines whether the printdirection flag (T1)j is forward and, if forward, forwardly prints outdata selecting the print start pointer (PT2)j to the print end pointer(PT3)j as print positions and selecting the carriage current pointer(PT1)j+1 of the j+1 row as the print end pointer (PT3) of the j row.

If the flag (T1) is not forward, the microprocessor 111 prints out databackwardly selecting the print end pointer (PT3)j to the print startpoint (PT2)j as print positions and selecting the carriage currentpointer (PT1)j+1 of the j+1 row as a print start pointer (PT2)j of the jrow. Such a manner of buffer input/output control allows data to bestored (input/output controlled) in the data buffer 118 in a ringstructure.

The input/output control in the ring structure mentioned above will bedescribed with reference to FIGS. 30 and 31. In FIG. 30, assume that thetime expires from the center toward the output, and that the clockwisedirection is forward and the counterclockwise direction backward. InFIG. 31, "A, B, . . . " represents a result of printout. Further, inFIGS. 30 and 31, dash-and-dots lines show data which are applied fromthe host system, solid lines show buffer input directions, and brokenlines show buffer output directions. It will be noted that (a)-(d) inFIGS. 30 and 31 correspond to each other.

Data coming in from the host system side are constantly entered in theforward direction, that is, in such a direction that the carriage isdriven forwardly to print out data. Paying attention to this face, asindicated by (a) in FIGS. 30 and 31, an address AD₁, for example, of thedata buffer 118 is selected as the initial buffer start address BF1 andimage data are sequentially entered in the forward direction from theaddress AD₁ to, for example, an address AD₂ which is a buffer endaddress BF2. If the output direction flag T3 of that instant is forward,the image data are sequentially outputted in the forward direction fromthe address AD₁ which is the buffer start address BF1 over to theaddress AD₂ which is the buffer end address BF2. In this manner, sinceimage data are read out of the data buffer 118 in the forward direction,the data buffer sequentially become empty in the forward direction (thenext store direction flag T₃ becomes forward).

Then, as indicated by (b), the address AD₂ which is the buffer endaddress BF2 is selected as a buffer start address BF1 of the next row(BF2=BF1) and the next row of image data are sequentially loaded in thedata buffer 118 starting at the address AD₂ and ending at an addressAD₃, for example, which is a buffer end address BF2. At this instat, ifthe output direction flag T₃ is backward, the image data aresequentially outputted from the address AD₃ over to the address AD₂.This time, therefore, the image data are read in the backward directionout of the data buffer 118 so that the data buffer 118 sequentiallybecomes empty in the backward direction (the next row store directionflag T3 becomes backward).

Then, as indicated by (c), the address AD₂ which is the buffer endaddress BF2 is selected as a buffer start address BF1 of the next rowand the image data of the next row are loaded in the image buffer 118backwardly starting at the address AD₂, which is the buffer startaddress BF1, and ending at, for example, the address AD₁ which is abuffer end address BF2. If the output direction flag T3 is backward, theimage data are sequentially read out from the address AD₂ which is thebuffer start address BF1 over to the address AD₁ which is the buffer endaddress BF2.

This sequentially empties the data buffer 118 in the backward directionso that, as indicated by (d), the next row of image data will bebackwardly entered starting at the address AD₁, which is the bufferstart address BF1, and down to the address AD₄, for example, which isthe buffer end address BF2.

In a bidirectional printout mode, particularly a one which is controlledby determining a particular direction, forward or backward, for printingout data with respect to a current carriage position, the ring structurediscussed above allows some data to be outputted in parallel relation toentry of other data. Such speeds up the processing for storing imagedata in a data buffer and, thereby, the whole printing operation.

While the present invention has been shown and described in relation toa wire dot impact printer, the present invention is similarly applicableto various other kinds of printers such as a thermal transfer printer,an ink jet printer and an optical printer which print out data in dots.

In summary, it will be seen that the present invention enablescharacters which belong to different configurations to be printed outwith ease without inviting an increase in the storage capacity of aprinter body.

Another advantage attainable with the present invention is that fastentry of print pattern data into a data buffer is realized to promotehigh-speed data printout.

Various modifications will become possible for those skilled in the artafter receiving the teachings of the present disclosure withoutdeparting from the scope thereof.

What is claimed is:
 1. A dot matrix printer for printing out data in abidirectional mode comprising:a print head capable of incrementalmovement in either of two directions; a first control microprocessormeans coupled to said print head for controlling said print head'sincremental movement in a given direction; a second controlmicroprocessor means for controlling the actuation of various dotfirings of said print head; a circular memory containing font data for aplurality of characters coupled to said second control microprocessormeans; wherein said second control microprocessor means in response to asignal to print a character stored in said circular memory computes thecenter point of a stored character in said memory and wherein furtherthe second microprocessor comprises means to compare said computedcenter point of said stored character with a current pointerrepresentative of the current position of said print head; means forstepping thru said circular memory means in a bidirectional fashion inaccordance with and in conjunction with the bidirectional movements ofsaid print head controlled by said first control microprocessor whereinthe stepping is under the control of said second microprocessor.